import 'package:flutter/material.dart';

class Login extends StatefulWidget {
  Login({Key key}) : super(key: key);
  final title = "嗨曼店家";
  _LoginState createState() => _LoginState();
}

class _LoginState extends State<Login> {
  @override
  Widget build(BuildContext context) {
    return Container(
      child: Scaffold(
          appBar: AppBar(title: Text(widget.title), centerTitle: true),
          body: Container(
              padding: EdgeInsets.symmetric(horizontal: 15, vertical: 15),
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.stretch,
                children: <Widget>[
                  TextField(
                    style: TextStyle(height: 2),
                    decoration: InputDecoration(
                        hintText: "请输入店铺编号",
                        prefixIcon: Row(
                          mainAxisSize: MainAxisSize.min,
                          children: <Widget>[
                            Padding(
                              padding: EdgeInsets.all(12),
                              child: Icon(
                                  Icons.store), // myIcon is a 48px-wide widget.
                            ),
                            Container(
                              width: 1,
                              height: 30,
                              color: Color(0xff4a4a4a),
                            )
                          ],
                        ),
                        suffixIcon: Icon(Icons.cancel)),
                  ),
                  TextField(
                    style: TextStyle(height: 2),
                    decoration: InputDecoration(
                        hintText: "请输入用户名",
                        prefixIcon: Icon(Icons.account_balance)),
                  ),
                  TextField(
                    style: TextStyle(height: 2),
                    obscureText: true,
                    decoration: InputDecoration(
                        suffixIcon: Icon(Icons.visibility_off),
                        hintText: "请输入密码",
                        prefixIcon: Icon(Icons.lock)),
                  ),
                  Container(
                    height: 100,
                  ),
                  Padding(
                    padding: EdgeInsets.symmetric(horizontal: 30),
                    child: RaisedButton(
                      shape: RoundedRectangleBorder(
                          borderRadius: BorderRadius.all(Radius.circular(30))),
                      padding: EdgeInsets.all(15),
                      onPressed: () => {print("pressed")},
                      child: Text("登录",
                          style: TextStyle(fontSize: 18, color: Colors.white)),
                      elevation: 4,
                      color: Colors.brown,
                      highlightElevation: 2,
                      disabledElevation: 0,
                    ),
                  )
                ],
              ))),
    );
  }
}
